import Vue from 'vue'

import UIRouter from '@/views/UIRouter.vue'
import Contacts from '@/views/Contacts.vue'
import About from '@/views/About.vue'

import All_contacts from '@/views/second/All_contacts.vue'
import Alice from '@/views/second/Alice.vue'
import Bob from '@/views/second/Bob.vue'

import Fax from '@/views/second/third/Fax.vue'
import Blog from '@/views/second/third/Blog.vue'

import VueRouter from 'vue-router'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: UIRouter,
    },
    {
      path: '/ui_router',
      component: UIRouter,
    },
    {
      path: '/contacts',
      component: Contacts,
      children: [
        {
          path: '/all_contacts',
          component: All_contacts,
        },
        {
          path: '/alice',
          component: Alice,
        },
        {
          path: '/bob',
          component: Bob,
          children: [
            {
              path: '/fax',
              component: Fax,
            },
            {
              path: '/blog',
              component: Blog,
            },
          ],
        },
      ],
    },
    {
      path: '/about',
      component: About,
    },
  ],
})

export default router
